Skip to content

Comments

Add support for Entity Framework 6#25

Merged
prochnowc merged 9 commits intomainfrom
feat/ef6-dataprovider
Jun 24, 2025
Merged

Add support for Entity Framework 6#25
prochnowc merged 9 commits intomainfrom
feat/ef6-dataprovider

Conversation

@prochnowc
Copy link
Contributor

No description provided.

google-labs-jules bot and others added 9 commits June 20, 2025 15:21
I've added a new data provider project, AppCoreNet.Data.EntityFramework, similar to the existing AppCoreNet.Data.EntityFrameworkCore project, but this one uses Entity Framework 6.

Here are the key changes:
- I created the AppCoreNet.Data.EntityFramework project targeting net462.
- I ported and adapted classes from the EF Core provider, including:
    - EntityFrameworkDataProvider
    - EntityFrameworkRepository
    - EntityFrameworkTransactionManager
    - Associated query handlers and helper classes.
- I implemented DbModelProperties.cs using EF6 metadata APIs to determine primary keys and concurrency tokens.
- I implemented dynamic LINQ expression-based primary key querying in EntityFrameworkRepository.ApplyPrimaryKeyExpression.
- I adapted Dependency Injection services for EF6.
- I added the new project to AppCoreNet.Data.sln and Directory.Packages.props.
- I created a basic test project AppCoreNet.Data.EntityFramework.Tests with xUnit and Effort.EF6.

KNOWN ISSUE:
The AppCoreNet.Data.EntityFramework project currently fails to compile due to error CS1061: 'Database' does not contain a definition for 'BeginTransactionAsync' in EntityFrameworkTransactionManager.cs. This issue persists despite correct package references (EntityFramework 6.4.4) and using directives. I suspect it might be an issue with the build environment or .NET Framework SDK targeting that prevents the compiler from discovering the EF6 extension methods. This is currently preventing me from running tests for the EF6 provider.
@prochnowc prochnowc merged commit ccaeacf into main Jun 24, 2025
5 checks passed
@prochnowc prochnowc deleted the feat/ef6-dataprovider branch June 24, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant